package com.huaxia.day8.t1;

public class Calculator1Impl implements Calculator1 {

    @Override
    public int add(int a, int b) {
        return a+b;
    }

    @Override
    public int sub(int a, int b) {
        return a-b;
    }

    @Override
    public long multiplication(int a, int b) {
        return (long)a*b;
    }

    @Override
   /* public double division(int a, int b) {
        double res  = 0D;
        if (b!=0){
            res=a/b;
        }
        return res;
    }*/

    public double division(int a, int b) {
        double re = 0D;
        try{
            re = a/b;
        }catch (Exception e){

        }
        return re;
    }
}
